﻿<phone:PhoneApplicationPage 
    x:Class="WP7Square.CheckInChooseVenue"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" shell:SystemTray.IsVisible="False"
    d:DataContext="{d:DesignData SampleData/CheckInChooseVenueViewModelSampleData.xaml}" d:DesignHeight="800" d:DesignWidth="480">

    <Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundBrush}">

        <Grid.RowDefinitions>
            <RowDefinition Height="304" />
            <RowDefinition Height="75" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>


        <Grid Grid.Row="0">
            <Border  BorderBrush="#ffa7a08c"
                     BorderThickness="2"
                     HorizontalAlignment="Center">
                <Canvas x:Name="canvasMapContainer" Width="460" Height="300">
                    <ScrollViewer x:Name="scrollMap" Width="460" Height="300" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
                        <Canvas x:Name="canvasMap" Width="600" Height="600">
                            <Image x:Name="imageMap" Width="600" Height="600"></Image>
                        </Canvas>
                    </ScrollViewer>
                    <StackPanel Canvas.ZIndex="99" x:Name="panelLoading" Width="460" Height="300" Background="Black">
                        <TextBlock Margin="0 25 0 0" HorizontalAlignment="Center" Foreground="White" FontSize="32" Text="Loading..."></TextBlock>
                    </StackPanel>
                </Canvas>
            </Border>
        </Grid>

        <Grid Grid.Row="1" Margin="0 10 0 0">

            <Grid Width="Auto" Margin="0,0,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="404*" />
                    <ColumnDefinition Width="60"  />
                </Grid.ColumnDefinitions>

                <TextBox Grid.Column="0" x:Name ="QueryString" Text="search..."/>
                <Button Grid.Column="1" Width="65"
                    
                        Name="SearchVenues" Click="Search_Click"
                        HorizontalAlignment="Right" VerticalAlignment="Stretch">
                    <Image Source="images/compass.png" HorizontalAlignment="Left"/>
                </Button>
            </Grid>

        </Grid>
        <Grid Grid.Row="2">
            <ListBox 
                 x:Name="NearbyVenues" 
                 Margin="0,15,0,0"
                 Height="Auto" 
                 SelectionChanged="NearbyVenues_SelectionChanged"
                 ItemsSource="{Binding Path=Items}" 
                 Style="{StaticResource ListBoxStyle}" VerticalAlignment="Top">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid>
                            <Grid.OpacityMask>
                                <LinearGradientBrush StartPoint="0,0.5" EndPoint="1, 0.5">
                                    <GradientStop Color="Black" Offset="0.85" />
                                    <GradientStop Color="Transparent" Offset="0.95" />
                                </LinearGradientBrush>
                            </Grid.OpacityMask>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="0" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Grid.Column="0">
                                <TextBlock Width="460" Text="{Binding Name}" Style="{StaticResource TripleLineListTitleTextStyleLarge}"/>
                                <TextBlock Width="430" Margin="-30, -3, 0, 0" Text="{Binding Address}" Style="{StaticResource TripleLineListTitleTextStyleMedium}"/>
                                <TextBlock Width="430" Margin="-30, -3, 0, 0" Text="{Binding Distance}" Style="{StaticResource TripleLineListTitleTextStyleSmall}"/>
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>

        </Grid>
    </Grid>

<!--
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar>
            <shell:ApplicationBar.Buttons>
                <shell:ApplicationBarIconButton IconUri="images/dark/refresh.png" Click="ApplicationBarRefresh_Click" Text="Refresh"/>
                <shell:ApplicationBarIconButton IconUri="images/dark/add.png" Click="ApplicationBarAdd_Click" Text="Add"/>
            </shell:ApplicationBar.Buttons>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
-->
</phone:PhoneApplicationPage>